/* 自定义样式补充 */

/* 确保下拉菜单正常工作 */
.layui-nav-tree .layui-nav-child {
    display: none;
}

.layui-nav-tree .layui-nav-itemed>.layui-nav-child {
    display: block;
}

/* 搜索项样式补充 */
.search-item span {
    font-weight: 500;
    color: inherit;
}

/* 面包屑导航补充样式 */
.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.breadcrumb-item .close-btn {
    margin-left: 8px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: inherit;
    font-size: 10px;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
}

.breadcrumb-item:not(.active):hover .close-btn {
    display: inline-block;
}

.breadcrumb-item .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.breadcrumb-item.active .close-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: inline-block;
}

.breadcrumb-item.active .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 首页面包屑的关闭按钮始终显示 */
.breadcrumb-item[data-path="/Home/Index"] .close-btn {
    display: inline-block !important;
}

/* 用户头像样式优化 */
.layui-nav-img {
    transition: all 0.3s ease;
}

.layui-nav-img:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 菜单项图标样式 */
.layui-nav-tree .layui-nav-item > a::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.layui-nav-tree .layui-nav-itemed > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 搜索框聚焦效果 */
.side-search-body .layui-input:focus {
    transform: scale(1.02);
}

/* 菜单项悬停效果增强 */
.layui-nav-tree .layui-nav-item > a:hover {
    box-shadow: inset 0 0 0 1px rgba(52, 152, 219, 0.3);
}

/* 活动菜单项样式增强 */
.layui-nav-tree .layui-this > a {
    box-shadow: inset 0 0 0 1px rgba(52, 152, 219, 0.5);
}

/* 子菜单项样式增强 */
.layui-nav-tree .layui-nav-child dd a:hover {
    box-shadow: inset 0 0 0 1px rgba(52, 152, 219, 0.2);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .layui-layout-admin .layui-side {
        width: 200px;
    }
    
    .layui-layout-admin .layui-body {
        left: 200px;
    }
    
    .layui-logo {
        font-size: 16px;
        padding-left: 15px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .breadcrumb-container {
        padding: 10px 15px;
    }
    
    .side-search-container {
        padding: 15px;
    }
}

/* 滚动条美化 */
.layui-side-scroll::-webkit-scrollbar {
    width: 6px;
}

.layui-side-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.layui-side-scroll::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 3px;
}

.layui-side-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.7);
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.layui-nav-tree .layui-nav-item {
    animation: fadeInUp 0.6s ease forwards;
}

.layui-nav-tree .layui-nav-item:nth-child(1) { animation-delay: 0.1s; }
.layui-nav-tree .layui-nav-item:nth-child(2) { animation-delay: 0.2s; }
.layui-nav-tree .layui-nav-item:nth-child(3) { animation-delay: 0.3s; }
.layui-nav-tree .layui-nav-item:nth-child(4) { animation-delay: 0.4s; }
.layui-nav-tree .layui-nav-item:nth-child(5) { animation-delay: 0.5s; }
.layui-nav-tree .layui-nav-item:nth-child(6) { animation-delay: 0.6s; }
.layui-nav-tree .layui-nav-item:nth-child(7) { animation-delay: 0.7s; }
.layui-nav-tree .layui-nav-item:nth-child(8) { animation-delay: 0.8s; }
.layui-nav-tree .layui-nav-item:nth-child(9) { animation-delay: 0.9s; }

/* 搜索下拉框动画 */
.side-search-dropdown {
    animation: fadeInUp 0.3s ease;
}

/* 面包屑动画 */
.breadcrumb-item {
    animation: fadeInUp 0.4s ease;
}

/* 主内容区域动画 */
.main-content {
    animation: fadeInUp 0.5s ease;
}

/* 表格显示优化（作用于主内容区域，避免全局影响） */
.main-content .layui-table-view {
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
}

/* Layui 在存在滚动条时会补偿一列 .layui-table-patch，这里隐藏避免右侧空白 */
.main-content .layui-table-patch {
    display: none !important;
    width: 0 !important;
}

/* 允许表格单元格在需要时换行，避免被裁切 */
.main-content .layui-table th,
.main-content .layui-table td {
    white-space: nowrap;
}